package com.hqyj.freemovie.front.config;

import cn.dev33.satoken.exception.NotLoginException;
import com.hqyj.freemovie.front.json.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


//全局的异常处理类
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(NotLoginException.class)
    public R handleNotLoginException(NotLoginException e){

        return R.error("非法操作，当前用户未登录！");
    }
}
